﻿using SqlSugar;

namespace PLM.ConfigurationCenter.Model {
    /// <summary>
    /// 
    /// </summary>
    [SugarTable("dbinfo")]
    public class DatabaseInfoModel {
        /// <summary>
        /// 数据库主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]//数据库是自增才配自增 
        public string Id { get; set; }
        /// <summary>
        /// 数据库类型
        /// 1.SQLSERVER 2.ORACLE 3.PGSQL
        /// </summary>
        [SugarColumn(ColumnDescription = "数据库类型", IsNullable = true)]
        public int DBType { get; set; } = 1;
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnDescription = "数据库类型", IsNullable = true)]
        public string ProviderName { get; set; }
        /// <summary>
        /// 服务器地址
        /// </summary>
        [SugarColumn(ColumnDescription = "服务器地址", IsNullable = true)]
        public string IPAddress { get; set; }
        /// <summary>
        /// 服务器端口号
        /// </summary>
        [SugarColumn(ColumnDescription = "服务器端口号", IsNullable = true)]
        public int? Port { get; set; }
        /// <summary>
        /// 用户账号
        /// </summary>
        [SugarColumn(ColumnDescription = "用户账号", IsNullable = true)]
        public string UserName { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        [SugarColumn(ColumnDescription = "Password", IsNullable = true)]
        public string Password { get; set; }
        /// <summary>
        /// 服务名称
        /// </summary>
        [SugarColumn(ColumnDescription = "服务名称", IsNullable = true)]
        public string ServerName { get; set; }
        /// <summary>
        /// 数据库名称
        /// </summary>
        [SugarColumn(ColumnDescription = "数据库名称", IsNullable = true)]
        public string DbName { get; set; }
    }
}
